<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        let input = `#2222/22/2###///#223399993#12301#0123`

        let obj9 = {
            1: [',', '.'],
            2: ['a', 'b', 'c'],
            3: ['d', 'e', 'f'],
            4: ['g', 'h', 'i'],
            5: ['j', 'k', 'l'],
            6: ['m', 'n', 'o'],
            7: ['p', 'q', 'r', 's'],
            8: ['t', 'u', 'v'],
            9: ['w', 'x', 'y', 'z'],
            0:[' ']
        }

        let r = 0
        let res = ''
        let tag = true


        while (r < input.length) {
            let str = ''
            let len = 0

            if (input[r] === '#') {
                tag = !tag
                r++
            }

            if (tag) {
                while (input[r] !== '#' && r < input.length) {
                    if (input[r] != '/') {
                        res += input[r]
                    }
                    r++
                }
            } else {
                while (input[r] === '/' && r < input.length) {
                    r++
                }

                if (input[r] !== '#' && r < input.length) {
                    str = input[r]
                    len++
                    while (input[r] !== '#' && r < input.length) {
                        r++
                        if (input[r] === str) {
                            len++
                        } else if (input[r] !== str) {
                            let index=len % obj9[str].length-1;
                            if(index<0){
                                index=obj9[str].length-1
                            }
                            
                            res += obj9[str][index]
                            break
                        }

                    }
                }


            }


        }


        console.log(res);
        


    </script>
</body>

</html>